package com.ignoreexception.controller;

import com.ignoreexception.bean.vo.BaseRespVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("test")
public class ExceptionController {

    @RequestMapping("exception")
    public String helloException() {

        System.out.println("hello exception");
        //数学计算异常
        //int i = 1 / 0;
        return "hello exception";
    }

    @RequestMapping("helloMvc")
    public BaseRespVo helloMvc() {
        return BaseRespVo.ok("hello MVC !");
    }
}
